package com.object;

public class Person extends Thread{
    private String preson;
    private int coumputer;

    public String getPreson() {
        return preson;
    }

    public String setPreson(String preson) {
        this.preson = preson;
        return preson;
    }

    public int getCoumputer() {
        return coumputer;
    }

    public void setCoumputer(int coumputer) {
        this.coumputer = coumputer;
    }

    public void CreateThreadDemo1() {
        // 设置当前线程的名字
        this.setName("石头剪刀布主线程");
    }

    /*@Override
    public void run() {
        // 每隔1s中输出一次当前线程的名字
        while (true) {
            // 输出线程的名字，与主线程名称相区分
            printThreadInfo();
            try {
                // 线程休眠一秒
                Thread.sleep(1000);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }

    private void printThreadInfo() {
    }*/
}
